import { Module } from 'vuex'
import { RootStateTypes } from '../index'

export interface UserMoudleTypes {
  now: number;
}
const user: Module<UserMoudleTypes, RootStateTypes> = {
  namespaced: true,
  state: {
    now: Date.now()
  },
  mutations: {
    setNow (state, data: number) {
      state.now = data
    }
  },
  actions: {
    // eslint-disable-next-line
    loadNow({ state, commit, rootState }) {},
  }
}
export default user
